const KoaRouter = require("koa-router");
const { verifyLogin } = require("../middleware/login.middleware");
const { sign } = require("../controller/login.controller");

const loginRouter = new KoaRouter({ prefix: "/login" });

// 登录接口
loginRouter.post("/", verifyLogin, sign);

loginRouter.get("/bar", function (ctx, next) {
  ctx.body = "this is a login/bar response";
});

module.exports = loginRouter;
